
<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<title>会员登录</title>
<link rel="stylesheet" type="text/css" href="./css/login.css">
<script
	src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
	<!-- login -->
	<div class="top center">
		<div class="logo center">
			<a href="./index.html" target="_blank"><img
				src="../image/mistore_logo.png" alt=""></a>
		</div>
	</div>
	<form method="post" action="${ctx}/checkLogin" class="form center">
		<div class="login">
			<div class="login_center">
				<div class="login_top">

					<div class="left fl">会员登录</div>
					<div class="right fr">
						您还不是我们的会员？<a href="./register.html" target="_self">立即注册</a>
					</div>
					<div class="clear"></div>
					<div class="xian center"></div>
				</div>
				<div class="login_main center">
					<div class="username">
						用户名:&nbsp;<input class="shurukuang" type="text" name="Uname"
							placeholder="请输入你的用户名" />
					</div>
					<div class="username">
						密&nbsp;&nbsp;&nbsp;&nbsp;码:&nbsp;<input class="shurukuang"
							type="password" name="Passwd" placeholder="请输入你的密码" />
					</div>
					 <div class="username">
						<div class="left fl">
							验证码:&nbsp;<input class="yanzhengma" type="text" name="code"
								placeholder="请输入验证码" />
						</div>
						<div class="right fl">
							<img id="codeImg" alt="验证码" src="${ctx}/code"
								onclick="changeImg()">
						</div>
						<div class="left fl">
							<span>${err }</span>
						</div>
						<div class="clear"></div>
					</div> 
				</div>
				<div class="login_submit">
					<input class="submit" type="submit" name="submit" value="立即登录">
				</div>
			</div>
		</div>
	</form>
	<footer>
		<div class="copyright">简体 | 繁体 | English | 常见问题</div>
		<div class="copyright">
			小米公司版权所有-京ICP备10046444-<img src="./image/ghs.png" alt="">京公网安备11010802020134号-京ICP证110507号
		</div>

	</footer>

</body>

<script type="text/javascript">
	function changeImg() {
		var imgSrc = $("#codeImg");
		var src = imgSrc.attr("src");
		imgSrc.attr("src", chgUrl(src));
	}

	//加入时间戳，去缓存机制   
	function chgUrl(url) {
		var timestamp = (new Date()).valueOf();
		if ((url.indexOf("&") >= 0)) {
			url = url + "&timestamp=" + timestamp;
		} else {
			url = url + "?timestamp=" + timestamp;
		}
		return url;
	}
</script>
</html>

